﻿using System;
using Utils;

namespace StockModel
{
	public class QuotationDailyStatistics : PropertyChangedNotifier
	{
		#region Attributes

		private decimal? _openDiffPercentage;
		private decimal? _previousDayDiffPercentage;
		private decimal? _gapDifferencePercentage;
		private decimal? _bidAskAverage;
		private int? _lastVolume;
		private decimal? _maxOpenDifferencePercentage;
		private decimal? _minOpenDifferencePercentage;
		private TimeSpan? _lastOperation;

		#endregion

		#region Properties

		public decimal? OpenDiffPercentage
		{
			get
			{
				return _openDiffPercentage;
			}
			set
			{
				if (_openDiffPercentage != value)
				{
					_openDiffPercentage = value;
					base.OnPropertyChanged("OpenDiffPercentage");
				}
			}
		}

		public decimal? PreviousDayDiffPercentage
		{
			get
			{
				return _previousDayDiffPercentage;
			}
			set
			{
				if (_previousDayDiffPercentage != value)
				{
					_previousDayDiffPercentage = value;
					base.OnPropertyChanged("PreviousDayDiffPercentage");
				}
			}
		}

		public decimal? GapDifferencePercentage
		{
			get
			{
				return _gapDifferencePercentage;
			}
			set
			{
				if (_gapDifferencePercentage != value)
				{
					_gapDifferencePercentage = value;
					base.OnPropertyChanged("GapDifferencePercentage");
				}
			}
		}

		public decimal? BidAskAverage
		{
			get
			{
				return _bidAskAverage;
			}
			set
			{
				if (_bidAskAverage != value)
				{
					_bidAskAverage = value;
					base.OnPropertyChanged("BidAskAverage");
				}
			}
		}

		public int? LastVolume
		{
			get
			{
				return _lastVolume;
			}
			set
			{
				if (_lastVolume != value)
				{
					_lastVolume = value;
					base.OnPropertyChanged("LastVolume");
				}
			}
		}

		public decimal? MaxOpenDifferencePercentage
		{
			get
			{
				return _maxOpenDifferencePercentage;
			}
			set
			{
				if (_maxOpenDifferencePercentage != value)
				{
					_maxOpenDifferencePercentage = value;
					base.OnPropertyChanged("MaxOpenDifferencePercentage");
				}
			}
		}

		public decimal? MinOpenDifferencePercentage
		{
			get
			{
				return _minOpenDifferencePercentage;
			}
			set
			{
				if (_minOpenDifferencePercentage != value)
				{
					_minOpenDifferencePercentage = value;
					base.OnPropertyChanged("MinOpenDifferencePercentage");
				}
			}
		}

		public TimeSpan? LastOperation
		{
			get
			{
				return _lastOperation;
			}
			set
			{
				if (_lastOperation != value)
				{
					_lastOperation = value;
					base.OnPropertyChanged("LastOperation");
				}
			}
		}

		#endregion
	}
}
